package com.mz.ozy.widget.dialog;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.Gravity;
import android.view.View;

import com.mz.ozy.R;
import com.mz.ozy.activity.me.JoinMemberActivity;
import com.mz.ozy.activity.me.UpVipActivity;

/**
 * @author wansong
 * @description:
 * @date :2020/10/15 15:02
 */
public class NotVipDialog extends BaseDialog implements View.OnClickListener {

    private Context mContext;

    public NotVipDialog(Activity mContext) {
        super(mContext, R.layout.dialog_show_vip, Gravity.CENTER, true, true);
        this.mContext = mContext;
        initView();
    }

    private void initView() {
        setOnViewClick(R.id.bt_confirm, this);
        setOnViewClick(R.id.iv_msg_close, this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.iv_msg_close:
                dismissDialog();
                break;
            case R.id.bt_confirm:
                if (mContext != null)
                    mContext.startActivity(new Intent(mContext, JoinMemberActivity.class));
                dismissDialog();
                break;
        }
    }

//    private NotVipDialog.onDialogListener mListener;
//
//    public void setOnDialogListener(NotVipDialog.onDialogListener listener) {
//        mListener = listener;
//    }
//
//    public interface onDialogListener {
//        void onCancel();
//
//        void onSubmit();
//    }
}
